/*
 * @Author: PaVan 739355616@qq.com
 * @Date: 2025-01-11 16:59:19
 * @LastEditors: PaVan 739355616@qq.com
 * @LastEditTime: 2025-01-11 17:15:27
 * @FilePath: /sjf/weChat_project/framework/gtest_test/gtest.cc
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#include <iostream>
#include <gtest/gtest.h>

int add(int a,int b)
{
    return a + b;
}

TEST(add_test, test1)
{
    ASSERT_EQ(add(10,20), 30);
    ASSERT_LT(add(20,20), 50);
}

TEST(test1, stringcomp)
{
    std::string str = "nihao";
    EXPECT_EQ(str,"hello");
    EXPECT_EQ(str,"nihao");
}

int main(int argc,char* argv[])
{
    testing::InitGoogleTest(&argc, argv);
    return RUN_ALL_TESTS();
}